﻿CREATE PROCEDURE [dbo].[ApplicationConfig_Insert]

@CreatedBy uniqueidentifier
, @ModifiedBy uniqueidentifier
, @ConfigKey varchar (48)
, @ConfigValue varchar (128)
, @Description varchar (64)
AS
BEGIN
SET NOCOUNT ON

DECLARE @CreatedDate datetime
DECLARE @ModifiedDate datetime
DECLARE @Deleted bit
DECLARE @ApplicationConfigiD uniqueidentifier
SET @CreatedDate = GETDATE()
SET @ModifiedDate = GETDATE()
SET @Deleted = 0
SET @ApplicationConfigiD = NEWID()

INSERT INTO [dbo].[ApplicationConfig] ([ApplicationConfigiD]
, [CreatedDate]
, [CreatedBy]
, [ModifiedDate]
, [ModifiedBy]
, [Deleted]
, [ConfigKey]
, [ConfigValue]
, [Description]
)
VALUES (@ApplicationConfigiD
, @CreatedDate
, @CreatedBy
, @ModifiedDate
, @ModifiedBy
, @Deleted
, @ConfigKey
, @ConfigValue
, @Description
)

SELECT @ApplicationConfigiD [ApplicationConfigiD]
END
